#pragma once

struct GLTexture;

class Font: public IResource
{
public:
	Font(const std::string& path, float size);
	~Font();

	/*-IResource----------------------------------------------------------------*/
	void Reload();
	/*--------------------------------------------------------------------------*/

	float GetLabelWidth(const std::string& content) const;
	const uint* GetLettersWidths() const;

	float GetSize() const;
	void SetSize(float size);

	const std::string& GetPath() const;
	void SetPath(const std::string& path);

	GLTexture* GetTexture() const;

private:
	float m_size;
	std::string m_path;


	void CreateCache();
	GLTexture* m_cache;
	uint* m_widths;
};
